package fields

import (
	
	
)

// StackMode configures mode of series stacking.
// FIXME: copied here to avoid circular imports with parent package
type StackMode string

const (
	// Unstacked will not stack series
	Unstacked StackMode = "none"
	// NormalStack will stack series as absolute numbers
	NormalStack StackMode = "normal"
	// PercentStack will stack series as percents
	PercentStack StackMode = "percent"
)

type OverrideOption func(field *sdk.FieldConfigOverride)

// Unit overrides the unit.
func ( string) OverrideOption {
	return func( *sdk.FieldConfigOverride) {
		.Properties = append(.Properties,
			sdk.FieldConfigOverrideProperty{
				ID:    "unit",
				Value: ,
			})
	}
}

// FillOpacity overrides the opacity.
func ( int) OverrideOption {
	return func( *sdk.FieldConfigOverride) {
		.Properties = append(.Properties,
			sdk.FieldConfigOverrideProperty{
				ID:    "custom.fillOpacity",
				Value: ,
			})
	}
}

// FixedColorScheme forces the use of a fixed color scheme.
func ( string) OverrideOption {
	return func( *sdk.FieldConfigOverride) {
		.Properties = append(.Properties,
			sdk.FieldConfigOverrideProperty{
				ID: "color",
				Value: map[string]string{
					"mode":       "fixed",
					"fixedColor": ,
				},
			})
	}
}

// NegativeY flips the results to negative values on the Y axis.
func () OverrideOption {
	return func( *sdk.FieldConfigOverride) {
		.Properties = append(.Properties,
			sdk.FieldConfigOverrideProperty{
				ID:    "custom.transform",
				Value: "negative-Y",
			})
	}
}

// AxisPlacement overrides how the axis should be placed in the panel.
func ( axis.PlacementMode) OverrideOption {
	return func( *sdk.FieldConfigOverride) {
		.Properties = append(.Properties,
			sdk.FieldConfigOverrideProperty{
				ID:    "custom.axisPlacement",
				Value: string(),
			})
	}
}

// Stack overrides if the series should be stacked and using which mode (default not stacked).
func ( StackMode) OverrideOption {
	return func( *sdk.FieldConfigOverride) {
		.Properties = append(.Properties,
			sdk.FieldConfigOverrideProperty{
				ID: "custom.stacking",
				Value: map[string]interface{}{
					"group": false,
					"mode":  string(),
				},
			})
	}
}